import request from '@/utils/request'
import {praseStrEmpty} from "@/utils/project";

// 查询企业信息列表
export function listCompany(query) {
    return request({
        url: '/server/company/list',
        method: 'get',
        params: query
    })
}

// 查询企业信息详细
export function getCompany(compId) {
    return request({
        url: '/server/company/' + praseStrEmpty(compId),
        method: 'get'
    })
}

// 新增企业信息
export function addCompany(data) {
    return request({
        url: '/server/company',
        method: 'post',
        data: data
    })
}

// 修改企业信息
export function updateCompany(data) {
    return request({
        url: '/server/company',
        method: 'put',
        data: data
    })
}

// 删除企业信息
export function delCompany(compId) {
    return request({
        url: '/server/company/' + compId,
        method: 'delete'
    })
}

// 导出企业信息
export function exportCompany(query) {
    return request({
        url: '/server/company/export',
        method: 'get',
        params: query
    })
}
